# coding: utf-8
from django.db import models
from markdownx.models import MarkdownxField
from orderable.models import Orderable
from me.db_utils import ShortUUIDField


class HelpArticle(Orderable):
    """
    教程文章
    """
    id = ShortUUIDField('标识', primary_key=True, max_length=10, editable=False)
    title = models.CharField('标题', max_length=60)
    content = MarkdownxField(verbose_name=u'内容')
    create_time = models.DateTimeField(u'创建时间', auto_now_add=True)
    update_time = models.DateTimeField(u'更新时间', auto_now=True)

    class Meta:
        verbose_name = u'帮助文章'
        verbose_name_plural = verbose_name

    def __str__(self):
        return self.title
